#ifndef CSNAKE_H
#define CSNAKE_H

#include<vector>
#include<utility>
#include<iostream>
#include<algorithm>
#include "Common.h"


enum Direction { UP, DOWN, LEFT, RIGHT };

class CSnake {
private:
	std::vector<Position> body;
	Direction direction;
	bool isAlive;


public:
	//ctor
	CSnake(const GameBasic& basic);

	Position getHeadPosition() const;

	Direction getCurrentDirection();

	Position snakeMove(Direction currentDirection);

	void grow(bool isAte);

	const std::vector<Position>& getSnake() const;

	void shrink();

	void halve();

};

#endif // !CSNAKE_H